#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
double fun1(double x, int n);

double fun2(double x, int n);

double fun1(double x, int n)
{
		for (int i = 1; i <= n; i++)
	{
		x =  sqrt(i + x);
	
	}
	return x;
}

double fun2(double x, int n)
{
	if (n == 0)
		return x;

	return sqrt(n+fun2(n-1,x));
}

int main()
{
	double x = fun2(4.2,10);
	printf("%.2lf", x);
	
	return 0;
}